#include"EpollServer.hpp"
#include"Logger.hpp"
#include<string>
#include<iostream>
#include<memory>

void Usage(const std::string& proc)
{
    std::cerr << "Usage: " << proc << " serverport" << std::endl;
}

int main(int argc , char* argv[])
{
    if(argc != 2)
    {
        Usage(argv[1]);
        return 0;
    }

    EnableConsoleLogStrategy();

    uint16_t port = std::stoi(argv[1]);
    std::unique_ptr<EpollServer> selectsvr = std::make_unique<EpollServer>(port);
    selectsvr->Start();
    
    return 0;
}